package com.ccrfid.rmc6.repository.business.chongqing;

import com.ccrfid.rmc6.entity.business.chongqing.CQPatrolLocationEntity;
import org.springframework.data.repository.Repository;

import java.util.List;

public interface CQPatrolLocationRepository extends Repository<CQPatrolLocationEntity, Long> {

    CQPatrolLocationEntity save(CQPatrolLocationEntity entity);

    List<CQPatrolLocationEntity> getAllBy();

    List<CQPatrolLocationEntity> getAllByPatrolRoadIdOrderById(Long patrolRoadId);

    boolean existsByPatrolRoadId(Long patrolRoadId);

    void deleteAllByPatrolRoadId(Long patrolRoadId);

    boolean existsByPatrolRoadIdAndLocationId(Long patrolRoadId, Long locationId);

    void deleteByPatrolRoadIdAndLocationId(Long patrolRoadId, Long locationId);
}
